/**
 * Copyright (C), 2020-2021 by colley.ma
 * File Name: Async.java
 * Encoding: UTF-8
 * Date: 2021年3月31日 上午10:44:03
 * History:
*/
package com.swak.frame.config;

import org.springframework.boot.context.properties.ConfigurationProperties;

import com.swak.frame.SwakConstants;
import com.swak.frame.server.ServerConstant;

/**
 * 
 * 
 * mars.frame.threadpool.core_pool_size=20
 * mars.frame.threadpool.max_pool_size=60
 * mars.frame.threadpool.queue_capacity=100
 * 
 * ClassName: AsyncProperties.java
 * 
 * @author colley.ma
 * @date 2021年3月31日 上午11:28:25
 */
@ConfigurationProperties(prefix =SwakConstants.SWAK_SERVER)
public class ServerRegisterProperties {

	private long heatPeriod;

	private long heatDelay;
	
	private boolean monitor;

	public long getHeatPeriod() {
		if(heatPeriod<=0) {
			return ServerConstant.DEFAULT_HEATPERIOD;
		}
		return heatPeriod;
	}

	public void setHeatPeriod(long heatPeriod) {
		this.heatPeriod = heatPeriod;
	}

	public long getHeatDelay() {
		if(heatDelay<=0) {
			return ServerConstant.DEFAULT_HEATDELAY;
		}
		return heatDelay;
	}

	public void setHeatDelay(long heatDelay) {
		this.heatDelay = heatDelay;
	}

	public boolean isMonitor() {
		return monitor;
	}

	public void setMonitor(boolean monitor) {
		this.monitor = monitor;
	}
}
